<template>
	<div id="">
		<van-row>
			<van-col span="24">
				<van-col span="2" offset="1">
					<van-icon name="arrow-left" size="30" @click="icon" class="icon" />
				</van-col>
				<van-col span="21">
					<p class="texts">{{user.nickName}}</p>
				</van-col>
			</van-col>
		</van-row>
		<van-tabs v-model="activeName">
		  <van-tab title="关注" name="a">内容 1</van-tab>
		  <van-tab title="粉丝" name="b">内容 2</van-tab>
		  <van-tab title="收藏" name="c">
			  <div id="" v-for="(item,index) in collects">
			  	<van-card
			  	  :price="item.price"
			  	  :desc="item.name"
			  	  :thumb="url+item.img"
			  	  style="margin-top: 1.25rem;"
			  	/>
			  </div>
			  
		  </van-tab>
		</van-tabs>
	
	</div>
</template>

<script>
	export default{
		data(){
			return{
				 activeName: 'c',
				 user:{},
				 collects:[],
				 url:'https://img.9lele.com/',
			}
		},
		created() {
			this.user = JSON.parse(localStorage.getItem('usernews'))
			this.collects = JSON.parse(localStorage.getItem('collect'))
			console.log(this.collects)
			console.log(JSON.parse(localStorage.getItem('collect')))
		},
		methods:{
			icon(){
				this.$router.push('/mine')
			}
		}
	}
</script>

<style>
</style>
